home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
codeco1a
/
frmaddin.frx
< prev
next >
Wrap
Text File
|
1999-06-26
|
1KB
|
42 lines
í' Code for modErrHandling.bas (Module)
' By J.M.Goebel (hmg65@dialup.nacamar.de)
' This Code is Freeware if you use this code to develop new Applications
' it may only be distributed as Freeware!
'This code must be copied into frmAddin.txtModErrHandling.text
'Of course the textbox must be multiline!
Option Explicit
Public Const ComponentErrorOffset = 1000
Public gStatus$
Public Sub RaiseError(Number&, Description$, Source$)
Err.Raise Number, Description, Source
End Sub
Public Sub LogError(Number&, Description$, Source$, Status$, CodeLocation$)
Dim strEvent$
If App.LogMode = 0 Or App.LogMode = 1 Then
App.StartLogging App.Path + "\" + App.EXEName + ".log", 2
End If
strEvent = "Error: " & Number
strEvent = strEvent + vbCrLf + "Description: " & Description
strEvent = strEvent + vbCrLf + "Source: " & Source
strEvent = strEvent + vbCrLf + "Status: " & Status
strEvent = strEvent + vbCrLf + "CodeLocation: " & CodeLocation
strEvent = strEvent + vbCrLf + "Time: " & Format(Now)
strEvent = strEvent + vbCrLf + "Version: " & App.Major & "." & App.Minor & "." &
App.Revision
App.LogEvent strEvent, vbLogEventTypeError
End Sub
Text1Text1Text1